import request from '@/utils/request'

// 查询物料列表
export function listMaterialItem(query) {
  return request({
    url: '/mes/md/materialitem/list',
    method: 'get',
    params: query
  })
}

// 查询物料详细
export function getMaterialItem(itemId) {
  return request({
    url: '/mes/md/materialitem/' + itemId,
    method: 'get'
  })
}

// 新增物料
export function addMaterialItem(data) {
  return request({
    url: '/mes/md/materialitem',
    method: 'post',
    data: data
  })
}

// 修改物料
export function updateMaterialItem(data) {
  return request({
    url: '/mes/md/materialitem',
    method: 'put',
    data: data
  })
}

// 删除物料
export function delMaterialItem(itemId) {
  return request({
    url: '/mes/md/materialitem/' + itemId,
    method: 'delete'
  })
}
